/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package v2.br.ufba.lasid.virt;

import v2.br.ufba.lasid.net.INode;

/**
 *
 * @author aliriosa
 */
public class VirtualMachine implements IVirtualMachine{
    
    protected IHypervisor hypervisor;
    protected String ID;

    public VirtualMachine(IHypervisor hypervisor, String ID) {
        this.hypervisor = hypervisor;
        this.ID = ID;
    }
        
    public void shutdown() throws Exception{
        hypervisor.shutdown(this);
    }
    
    public void startup() throws Exception{
        hypervisor.startup(this);
    }
    
    public void updateStatus() throws Exception{
        hypervisor.update(this);
    }
    
    public void migrate(INode node) throws Exception {
        hypervisor.migrate(this, node);
    }
       
    public IHypervisor getHypervisor() {
        return hypervisor;
    }    

    public String getID() {
        return ID;
    }
        
}
